//
//  RideViewModel.m
//  didacar
//
//  Created by imac on 16/3/17.
//  Copyright © 2016年 dzmmac. All rights reserved.
//

#import "RideViewModel.h"

@implementation RideViewModel

/**
 *  获取乘车数据
 *
 *  @param resultBlock
 */
-(void)getRideTarget:(DealDataResultBlock)resultBlock{
    NSMutableDictionary *postDic = [[NSMutableDictionary alloc ] init];
    [postDic setObj:USERINFOManager.getUserInfo.MemberId forKey:@"MemberId"];

    WEAKSELF
    [[BaseHttpRequest sharedInstance] sendRequestToPost:@"TicketOrder.RideTarget" withData:postDic alertMessage:@"" success:^(NSDictionary *dicData) {
        weakSelf.rideEntity = [[RideEntity alloc ] initWithDictionary:dicData];
        resultBlock(1,nil,nil);
    } error:^(NSString *errorMsg) {
        resultBlock(0,nil,errorMsg);
    }];
}

@end
